package com.zjuh.goodboy.util;

import java.sql.Timestamp;
import java.util.Date;

public class SqlDateUtil {
	
	public static Timestamp asTimestamp(Date date) {
		if (date == null) {
			return null;
		}
		if (date instanceof Timestamp) {
			return (Timestamp)date;
		}
		return new Timestamp(date.getTime());
	}
	
}
